import request from '@/utils/request'

//   获取-部门列表
export function getDepartment(){
    return request({
        url:'/company/department',
        method:'get'
    })
}
// 获取-部门负责人列表
export function getManagerIdAndName(){
    return request({
        url:'/sys/user/simple',
        method:'get'
    })
}
//新增-部门
export function addDepartment(data){
    return request({
        url:'/company/department',
        method:'post',
        data
    })
}
//获取部门详情
export function getDepartmentDetail(id) {
    return request({
        url:`/company/department/${id}`
    })
}
//编辑部门
export function updateDepartment(data){
    return request({
        method: 'put',
        url: `/company/department/${data.id}`,
        data
    })
}
//删除部门
export function delDepartment(id){
    return request({
        url: `/company/department/${id}`,
        method: 'delete'
    })
}

